Excess Mortality in Europe and Why (part 2)¶
Author: Justin Garza
Date: See below
Description:
This notebook explores the causes of death and their changes over time.
this is the part 2, part 1 can be seen here [Excess Mortality in Europe and Why] (https://jgarza9788.github.io/Excess_Mortality_And_Vaccines_In_Europe/index.html)
Content Warning:
If you find discussions of death or its underlying factors distressing, please proceed with caution or consider whether this content is right for you.
from datetime import datetime
from IPython.display import display
from IPython.display import Markdown as MD
current_date = datetime.now().strftime('%Y-%m-%d')
version = datetime.now().strftime('%Y%m%d.%H%M')
display(MD(f"**Date:** {current_date}"))
display(MD(f"**version:** {version}"))
Date: 2025-01-19
version: 20250119.1412
Background information¶
During late 2020 and much of 2021 many people took one or multiple covid vaccines.
Width so many people taking the vaccines could we see a change in causes of death?
the Covid-19 Vaccine¶
"Messenger RNA (mRNA) vaccine. This type of vaccine gives your cells instructions for how to make the S protein found on the surface of the COVID-19 virus. After vaccination, your muscle cells begin making the S protein pieces and displaying them on cell surfaces. This causes your body to create antibodies." www.mayoclinic.org%20vaccine.,your%20body%20to%20create%20antibodies.)
(Hypothesis) What are the medical issues we can we expect to see?¶
- Cardiovascular diseases: like heart disease, stroke, or coronary artery disease
- due to the fact that this an injection and some might leak into the blood stream and cause issues
- Liver disease: chronic liver disease
- the liver is the filter for the blood, so there is a possibility for the vaccine to effect the liver
- Neurological disorders: like Alzheimer's disease or Parkinson's disease
- an issue with the blood could inhibit how much oxygen gets to the brain
- Cancers
- if the instructions leak into the DNA it could cause issues with the DNA and how cells reproduce.
- Unknown Issues
- since this is a new type of vaccine there is a possibility of new issues appearing from it. _ other
- if the immune system is negativly affected, we can expect deaths due to other illnesses and parasites
SetUp¶
just like part 1
# this code to will import all the things i need for this notebook
import os
import re
import math
import numpy as np
import pandas as pd
import random
from collections import Counter
# for the notebook rendering
from IPython.display import display, HTML, FileLink, Markdown
from IPython.display import FileLink as FL
from IPython.display import Markdown as MD
# Graphs and Charts
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
import seaborn as sns
import plotly.express as px
# use to export plotly graphs
import plotly.io as pio
#misc
from scipy.stats import spearmanr, kendalltau
import pycountry
# pandas Settings/Options
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
pd.set_option('display.width', 9000)
pd.set_option('max_colwidth', 400)
# colormap
heatmapCM = sns.color_palette('Spectral_r', as_cmap=True)
## directories
DIR = os.getcwd()
print(f'{DIR=}')
DataDIR = os.path.join(DIR,'data')
OutDIR = os.path.join(DIR,'docs')
if not os.path.exists(DataDIR):
print('***DATA FOLDER IS MISSING***')
if not os.path.exists(OutDIR):
os.makedirs(OutDIR)
DIR='C:\\Users\\JGarza\\GitHub\\Excess_Mortality_And_Vaccines_In_Europe'
Helping Functions¶
def df_column_uniquify(df):
'''
renames columns that are the same
'''
df_columns = df.columns
new_columns = []
for item in df_columns:
counter = 0
newitem = item
while newitem in new_columns:
counter += 1
newitem = "{}_{}".format(item, counter)
new_columns.append(newitem)
df.columns = new_columns
return df
def abbr_to_isoalpha3(abbr):
"""
Convert a European country ISO Alpha-2 code to ISO Alpha-3 code.
Parameters:
abbreviation (str): ISO Alpha-2 country code (e.g., 'DE' for Germany).
Returns:
str: ISO Alpha-3 country code (e.g., 'DEU'), or None if not found.
"""
try:
country = pycountry.countries.get(alpha_2=abbr.upper())
if country:
return country.alpha_3
else:
return None
except KeyError:
return None
# this if for converting between the abbreviation andand the names of the countries
country_dict = {
"BE": "Belgium",
"BG": "Bulgaria",
"CZ": "Czechia",
"DK": "Denmark",
"DE": "Germany",
"EE": "Estonia",
"IE": "Ireland",
"EL": "Greece",
"ES": "Spain",
"FR": "France",
"HR": "Croatia",
"IT": "Italy",
"CY": "Cyprus",
"LV": "Latvia",
"LT": "Lithuania",
"LU": "Luxembourg",
"HU": "Hungary",
"MT": "Malta",
"NL": "Netherlands",
"AT": "Austria",
"PL": "Poland",
"PT": "Portugal",
"RO": "Romania",
"SI": "Slovenia",
"SK": "Slovakia",
"FI": "Finland",
"SE": "Sweden",
"IS": "Iceland",
"LI": "Liechtenstein",
"NO": "Norway",
"CH": "Switzerland",
"UK": "United Kingdom",
"ME": "Montenegro",
"GE": "Georgia",
"AL": "Albania",
"RS": "Serbia",
"AD": "Andorra",
"AM": "Armenia",
}
def abbr_to_name(abbreviation):
return country_dict.get(abbreviation.upper(), "???")
def name_to_abbr(name):
try:
reverse_dict = {v: k for k, v in country_dict.items()}
return reverse_dict.get(name.title(), "???")
except:
return "???"
# testing
print( abbr_to_name("BE") ) # Output: 'Belgium'
print( name_to_abbr("Belgium") ) # Output: 'BE'
Belgium BE
# define now... put real values in later
ddr2023 = None
ddr2024 = None
vdr2023 = None
vdravg = None
def return_ddr2023_rank(abbr):
'''
the higher the value the higher the death
'''
if ddr2023 is None:
print('***DDR2023 DATA IS NOT LOADED***')
return None
for i, row in ddr2023.iterrows():
if abbr == row['abbr']:
return 1.0 - ( i/len(ddr2023) )
def return_vdr2023_rank(abbr):
'''
the higher the value the more vaccines
'''
if vdr2023 is None:
print('***vdr2023 DATA IS NOT LOADED***')
return None
for i, row in vdr2023.iterrows():
if abbr == row['abbr']:
return 1.0 - ( i/len(ddr2023) )
def return_vdravg_rank(abbr):
'''
the higher the value the more vaccines
'''
if vdravg is None:
print('***vdravg DATA IS NOT LOADED***')
return None
for i, row in vdravg.iterrows():
if abbr == row['abbr']:
return 1.0 - ( i/len(ddr2023) )
def return_vdravg_data(abbr):
'''
average vaccines between 2020-2023
'''
if vdravg is None:
print('***vdravg DATA IS NOT LOADED***')
return None
for i, row in vdravg.iterrows():
if abbr == row['abbr']:
return row['avg2020_2023']
print(return_ddr2023_rank('MT'))
print(return_ddr2023_rank('CY'))
print(return_vdr2023_rank('MT'))
print(return_vdr2023_rank('CY'))
print(return_vdravg_rank('MT'))
print(return_vdravg_rank('CY'))
print(return_vdravg_data('MT'))
print(return_vdravg_data('CY'))
***DDR2023 DATA IS NOT LOADED*** None ***DDR2023 DATA IS NOT LOADED*** None ***vdr2023 DATA IS NOT LOADED*** None ***vdr2023 DATA IS NOT LOADED*** None ***vdravg DATA IS NOT LOADED*** None ***vdravg DATA IS NOT LOADED*** None ***vdravg DATA IS NOT LOADED*** None ***vdravg DATA IS NOT LOADED*** None
ddr2023 = pd.read_csv(os.path.join(OutDIR,'ddr2023.csv'))
ddr2024 = pd.read_csv(os.path.join(OutDIR,'ddr2024.csv'))
vdr2023 = pd.read_csv(os.path.join(OutDIR,'vdr2023.csv'))
vdravg = pd.read_csv(os.path.join(OutDIR,'vdravg.csv'))
display(ddr2023.head(5))
display(ddr2024.head(5))
display(vdr2023.head(5))
display(vdravg.head(5))
| abbr | name | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | MT | Malta | 1.004157 | 0.961827 | 1.033935 | 1.067663 | 1.071152 | 1.184449 | 1.203738 | 1.226999 | 1.169429 | 1.195514 |
| 1 | CY | Cyprus | 1.016240 | 0.943163 | 1.040284 | 1.003756 | 1.076467 | 1.129533 | 1.249761 | 1.247856 | 1.157833 | 1.095931 |
| 2 | FI | Finland | 0.983845 | 1.009937 | 1.006529 | 1.023471 | 1.011123 | 1.038642 | 1.083859 | 1.163166 | 1.150723 | 1.071371 |
| 3 | IS | Iceland | 0.975717 | 1.026691 | 0.998060 | 1.006559 | 1.012375 | 1.029265 | 1.045927 | 1.203398 | 1.147478 | 1.163664 |
| 4 | NL | Netherlands | 0.990752 | 0.999534 | 1.009892 | 1.031217 | 1.021614 | 1.133312 | 1.147735 | 1.140822 | 1.138502 | 1.149227 |
| abbr | name | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | MT | Malta | 1.004157 | 0.961827 | 1.033935 | 1.067663 | 1.071152 | 1.184449 | 1.203738 | 1.226999 | 1.169429 | 1.195514 |
| 1 | IS | Iceland | 0.975717 | 1.026691 | 0.998060 | 1.006559 | 1.012375 | 1.029265 | 1.045927 | 1.203398 | 1.147478 | 1.163664 |
| 2 | NL | Netherlands | 0.990752 | 0.999534 | 1.009892 | 1.031217 | 1.021614 | 1.133312 | 1.147735 | 1.140822 | 1.138502 | 1.149227 |
| 3 | LI | Liechtenstein | 0.984876 | 1.050506 | 0.964909 | 1.062178 | 1.011598 | 1.240639 | 1.038833 | 1.085522 | 1.027161 | 1.127824 |
| 4 | IE | Ireland | 0.994335 | 1.004840 | 1.000934 | 1.020105 | 1.008454 | 1.028312 | 1.105698 | 1.135294 | 1.132809 | 1.113159 |
| abbr | name | 2020 | 2021 | 2022 | 2023 | |
|---|---|---|---|---|---|---|
| 0 | FI | Finland | 0.003119 | 123.689548 | 324.096693 | 272.896203 |
| 1 | PT | Portugal | 0.008074 | 94.765752 | 242.524514 | 206.590389 |
| 2 | IT | Italy | 0.004416 | 87.617659 | 233.812064 | 185.254382 |
| 3 | SE | Sweden | 0.002223 | 80.134686 | 207.824977 | 169.837101 |
| 4 | FR | France | 0.000154 | 85.965138 | 222.847236 | 123.812258 |
| abbr | name | avg2020_2023 | |
|---|---|---|---|
| 0 | FI | Finland | 180.171391 |
| 1 | PT | Portugal | 135.972182 |
| 2 | IT | Italy | 126.672130 |
| 3 | SE | Sweden | 114.449747 |
| 4 | FR | France | 108.156197 |
print(return_ddr2023_rank('MT'))
print(return_ddr2023_rank('CY'))
print(return_vdr2023_rank('MT'))
print(return_vdr2023_rank('CY'))
print(return_vdravg_rank('MT'))
print(return_vdravg_rank('CY'))
print(return_vdravg_data('MT'))
print(return_vdravg_data('CY'))
1.0 0.9696969696969697 0.6363636363636364 0.48484848484848486 0.7878787878787878 0.5151515151515151 63.682176806968585 53.34957190620881
Cause of Death Data¶
In this section, we import and clean the cause of death data to prepare it for analysis.
Source¶
Downloading Instructions¶
- Visit the source link.
- wair for load
- Move the "International Statistical Classification of Diseases and Related Health Problems (ICD-10 2010)" to "Rows"
- under the GeoPolitical
- Click "Download" and select the spreadsheet format.
- Confirm the download to obtain the data.
Description¶
This is the country, Cause of Death, and the count of each death between 2015 and 2023*.
- note: much of 2023 is not reported
variables¶
cod= cause of death datacod20dd102023= list of the top 20 cause of deaths with countries in the top 10 death data ranked by deaths in 2023
# getting the data
cod = pd.read_excel(os.path.join(DataDIR,"hlth_cd_aro__custom_14850625_page_spreadsheet.xlsx"),sheet_name="Sheet 1")
# remove the headers
cod = cod.iloc[9::]
# drop the bad columns
for c in cod.columns:
if pd.isnull(cod.at[9,c]):
cod = cod.drop(columns=[c])
# rename time columns
for c in cod.columns:
name = cod.at[9,c]
cod = cod.rename(columns={c: name})
# make the duplicate column names unique
cod = df_column_uniquify(cod)
# # rename the first two columns
cod = cod.rename(columns={'TIME': 'name'})
cod = cod.rename(columns={'TIME_1':'cod'})
# drop, replace, reset index,
cod = cod.drop([9,10])
cod = cod.replace(to_replace=':', value=None)
cod = cod.reset_index(drop=True)
display(cod.head(10))
C:\Users\JGarza\pythons\Python312\Lib\site-packages\openpyxl\styles\stylesheet.py:237: UserWarning: Workbook contains no default style, apply openpyxl's default
warn("Workbook contains no default style, apply openpyxl's default")
| name | cod | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | European Union - 27 countries (from 2020) | Total | 4618660 | 4536667 | 4660352 | 4693334 | 4660270 | 5189007 | 5298536 | None | None |
| 1 | European Union - 27 countries (from 2020) | Certain infectious and parasitic diseases (A00-B99) | 81735 | 74272 | 77707 | 77359 | 77128 | 73199 | 75560 | None | None |
| 2 | European Union - 27 countries (from 2020) | Tuberculosis | 4098 | 3809 | 3648 | 3597 | 3382 | 3041 | 2943 | None | None |
| 3 | European Union - 27 countries (from 2020) | Viral hepatitis and sequelae of viral hepatitis | 6956 | 6356 | 5857 | 4861 | 4396 | 4150 | 3587 | None | None |
| 4 | European Union - 27 countries (from 2020) | Chronic viral hepatitis B and C | 1127 | 4814 | 1020 | 4273 | 3830 | 3529 | 3028 | None | None |
| 5 | European Union - 27 countries (from 2020) | Human immunodeficiency virus [HIV] disease | 3234 | 2737 | 2438 | 2366 | 2173 | 2027 | 1891 | None | None |
| 6 | European Union - 27 countries (from 2020) | Other infectious and parasitic diseases (remainder of A00-B99) | 67284 | 61174 | 65666 | 66119 | 66788 | 64033 | 67197 | None | None |
| 7 | European Union - 27 countries (from 2020) | Neoplasms | 1200230 | 1213401 | 1212135 | 1216939 | 1218306 | 1215992 | 1193515 | None | None |
| 8 | European Union - 27 countries (from 2020) | Malignant neoplasm of lip, oral cavity, pharynx | 27968 | 28456 | 28285 | 28573 | 28094 | 27845 | 27571 | None | None |
| 9 | European Union - 27 countries (from 2020) | Malignant neoplasm of colon, rectosigmoid junction, rectum, anus and anal canal | 137921 | 139889 | 137718 | 137468 | 137428 | 135701 | 132364 | None | None |
# lets get the abbr
cod['abbr'] = cod['name'].apply(name_to_abbr)
cod.loc[cod.name.str.contains('28 countries') == True,'abbr'] = 'Eur28'
cod.loc[cod.name.str.contains('27 countries') == True,'abbr'] = 'Eur27'
# France is France
cod.loc[cod.name.str.contains('Metropolitan France') == True,'abbr'] = 'Fr'
# Turkey is Tr
cod.loc[cod.name.str.contains('Türkiye') == True,'abbr'] = 'Tr'
# lets exclude the Eur28 and Eur27
cod = cod[~cod['abbr'].isin(['Eur28', 'Eur27'])]
display(cod.tail(250).head(10))
# display(cod.head(10))
| name | cod | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | abbr | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1975 | Norway | Intentional self-harm | 598 | 627 | 603 | 681 | 666 | 650 | 657 | None | None | NO |
| 1976 | Norway | Accidental poisoning by and exposure to noxious substances | 324 | 348 | 298 | 331 | 323 | 376 | 322 | None | None | NO |
| 1977 | Norway | Assault | 25 | 36 | 30 | 24 | 31 | 36 | 31 | None | None | NO |
| 1978 | Norway | Event of undetermined intent | 7 | 5 | 5 | 6 | 8 | 12 | 12 | None | None | NO |
| 1979 | Norway | Other external causes of morbidity and mortality (remainder of V01-Y89) | 2 | 1 | 0 | 2 | 5 | 7 | 6 | None | None | NO |
| 1980 | Switzerland | Total | 68279 | 65533 | 67431 | 67621 | 68424 | 76853 | 71848 | 75199 | None | CH |
| 1981 | Switzerland | Certain infectious and parasitic diseases (A00-B99) | 849 | 765 | 825 | 823 | 826 | 851 | 912 | 1001 | None | CH |
| 1982 | Switzerland | Tuberculosis | 17 | 25 | 19 | 25 | 9 | 13 | 15 | 12 | None | CH |
| 1983 | Switzerland | Viral hepatitis and sequelae of viral hepatitis | 81 | 61 | 50 | 13 | 17 | 52 | 42 | 33 | None | CH |
| 1984 | Switzerland | Chronic viral hepatitis B and C | None | None | 0 | 9 | 11 | 6 | 7 | 11 | None | CH |
# reformat the year
cod = pd.melt(cod, id_vars=['name', 'abbr','cod'], var_name='year', value_name='deaths')
# we don't need cod total
cod = cod[cod.cod!= 'Total']
cod.year = pd.to_numeric(cod.year)
cod.deaths = pd.to_numeric(cod.deaths)
display(cod.head(10))
| name | abbr | cod | year | deaths | |
|---|---|---|---|---|---|
| 1 | Belgium | BE | Certain infectious and parasitic diseases (A00-B99) | 2015 | 2361.0 |
| 2 | Belgium | BE | Tuberculosis | 2015 | 57.0 |
| 3 | Belgium | BE | Viral hepatitis and sequelae of viral hepatitis | 2015 | 72.0 |
| 4 | Belgium | BE | Chronic viral hepatitis B and C | 2015 | NaN |
| 5 | Belgium | BE | Human immunodeficiency virus [HIV] disease | 2015 | 32.0 |
| 6 | Belgium | BE | Other infectious and parasitic diseases (remainder of A00-B99) | 2015 | 2200.0 |
| 7 | Belgium | BE | Neoplasms | 2015 | 28845.0 |
| 8 | Belgium | BE | Malignant neoplasm of lip, oral cavity, pharynx | 2015 | 588.0 |
| 9 | Belgium | BE | Malignant neoplasm of colon, rectosigmoid junction, rectum, anus and anal canal | 2015 | 2874.0 |
| 10 | Belgium | BE | Malignant neoplasm of trachea, bronchus and lung | 2015 | 6318.0 |
# filter out bad values
## old way of doing it
# cod = cod.replace([np.inf, -np.inf], np.nan).dropna()
cod = cod.map(lambda x: np.nan if x in [np.inf, -np.inf] else x).dropna()
# here we normalize the cause of death data
cod['deaths_norm'] = None
cod.reset_index(drop=True)
# print(cod.columns)
## baseline years are 2015,2016,2017 before the pandemic
blyears = cod[cod.year.isin([2015,2016,2017])]
grouped = blyears.groupby(['name','abbr','cod'])
temp = grouped['deaths'].agg(
baseline='mean',
).reset_index()
for _, row in temp.iterrows():
try:
cod.loc[(cod.abbr == row['abbr']) & (cod.cod == row['cod']) & (cod.name == row['name']), 'deaths_norm'] = cod[(cod.abbr == row['abbr']) & (cod.cod == row['cod']) & (cod.name == row['name'])].deaths / row['baseline']
except Exception as e:
# can't caluate them all
print(f"Error: {e} | {row=}")
cod.deaths_norm = pd.to_numeric(cod.deaths_norm)
# integrate Part 1 data
cod['ddr2023_rank'] = cod.abbr.apply(return_ddr2023_rank)
cod['vdr2023_rank'] = cod.abbr.apply(return_vdr2023_rank)
cod['vdravg_rank'] = cod.abbr.apply(return_vdravg_rank)
viewing some data¶
display(cod.head(10))
| name | abbr | cod | year | deaths | deaths_norm | ddr2023_rank | vdr2023_rank | vdravg_rank | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Belgium | BE | Certain infectious and parasitic diseases (A00-B99) | 2015 | 2361.0 | 1.034921 | 0.333333 | 0.666667 | 0.69697 |
| 2 | Belgium | BE | Tuberculosis | 2015 | 57.0 | 1.315385 | 0.333333 | 0.666667 | 0.69697 |
| 3 | Belgium | BE | Viral hepatitis and sequelae of viral hepatitis | 2015 | 72.0 | 1.102041 | 0.333333 | 0.666667 | 0.69697 |
| 5 | Belgium | BE | Human immunodeficiency virus [HIV] disease | 2015 | 32.0 | 0.914286 | 0.333333 | 0.666667 | 0.69697 |
| 6 | Belgium | BE | Other infectious and parasitic diseases (remainder of A00-B99) | 2015 | 2200.0 | 1.033835 | 0.333333 | 0.666667 | 0.69697 |
| 7 | Belgium | BE | Neoplasms | 2015 | 28845.0 | 1.006525 | 0.333333 | 0.666667 | 0.69697 |
| 8 | Belgium | BE | Malignant neoplasm of lip, oral cavity, pharynx | 2015 | 588.0 | 1.002843 | 0.333333 | 0.666667 | 0.69697 |
| 9 | Belgium | BE | Malignant neoplasm of colon, rectosigmoid junction, rectum, anus and anal canal | 2015 | 2874.0 | 1.009129 | 0.333333 | 0.666667 | 0.69697 |
| 10 | Belgium | BE | Malignant neoplasm of trachea, bronchus and lung | 2015 | 6318.0 | 1.025372 | 0.333333 | 0.666667 | 0.69697 |
| 11 | Belgium | BE | Malignant neoplasm of other parts of uterus | 2015 | 364.0 | 0.934932 | 0.333333 | 0.666667 | 0.69697 |
abbrs = ddr2023.abbr.head(100).to_list()
cod_counter = Counter()
for abbr in abbrs:
temp = cod[cod.abbr == abbr]
temp = temp.sort_values(by='cod',ascending=True)
temp = temp.sort_values(by='year',ascending=False)
death_rank = return_ddr2023_rank(abbr)
vaccine_rank = return_vdr2023_rank(abbr)
average_vaccine = return_vdravg_data(abbr)
# get the average death norms for 2015,2016,2017,2018,2019 (prepandemic)
grouped = temp[temp.year.isin([2015,2016,2017,2018,2019])].groupby('cod')
dn00 = grouped.deaths_norm.agg(
Mean='mean'
).reset_index()
# get the average death norms for pandemic and postpandemic
grouped = temp[temp.year.isin([2020,2021,2023])].groupby('cod')
dn01 = grouped.deaths_norm.agg(
Mean='mean'
).reset_index()
# merge them
dn02 = pd.merge(dn00, dn01, on='cod', how='outer')
# display(dn02)
# only keep the ones where the Mean of pandemic and postpandemic is greater than prepandemic
dn02 = dn02[ (dn02.Mean_x + 0.25) < dn02.Mean_y]
cod_counter.update(dn02.cod.to_list())
temp = temp[temp.cod.isin(dn02.cod)]
title = f'{abbr_to_name(abbr)} {abbr} causes of death from 2015 - 2023* '
display(MD(f'### {title}'))
display(MD('#### these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023'))
try:
display(MD(f'#### {death_rank=:.4f},{vaccine_rank=:.4f},{average_vaccine=:.4f}'))
except:
pass
fig = px.line(
temp,
x= 'year',
y= 'deaths_norm',
color='cod',
hover_data=['abbr','name','cod','deaths_norm'],
title=title,
)
fig.update_layout(template="plotly_dark")
fig.show()
Malta MT causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=1.0000,vaccine_rank=0.6364,average_vaccine=63.6822¶
Cyprus CY causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.9697,vaccine_rank=0.4848,average_vaccine=53.3496¶
Finland FI causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.9394,vaccine_rank=1.0000,average_vaccine=180.1714¶
Iceland IS causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.9091,vaccine_rank=0.1818,average_vaccine=49.0175¶
Netherlands NL causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.8788,vaccine_rank=0.7273,average_vaccine=56.5856¶
Ireland IE causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.8485,vaccine_rank=0.7576,average_vaccine=60.8369¶
Germany DE causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.8182,vaccine_rank=0.5758,average_vaccine=57.4140¶
Denmark DK causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.7879,vaccine_rank=0.7879,average_vaccine=62.6449¶
Austria AT causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.7576,vaccine_rank=0.3333,average_vaccine=50.1820¶
Luxembourg LU causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.7273,vaccine_rank=0.5152,average_vaccine=52.3950¶
Portugal PT causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.6970,vaccine_rank=0.9697,average_vaccine=135.9722¶
Slovenia SI causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.6667,vaccine_rank=0.3030,average_vaccine=38.3650¶
Switzerland CH causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
Norway NO causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.6061,vaccine_rank=0.5455,average_vaccine=56.6662¶
France FR causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.5758,vaccine_rank=0.8788,average_vaccine=108.1562¶
Greece EL causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.5455,vaccine_rank=0.6061,average_vaccine=53.5063¶
Spain ES causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.5152,vaccine_rank=0.6970,average_vaccine=58.4003¶
Estonia EE causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.4848,vaccine_rank=0.3939,average_vaccine=43.9019¶
Poland PL causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.4545,vaccine_rank=0.8182,average_vaccine=79.3814¶
Liechtenstein LI causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.4242,vaccine_rank=0.4545,average_vaccine=50.0819¶
Czechia CZ causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.3939,vaccine_rank=0.4242,average_vaccine=46.3955¶
Italy IT causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.3636,vaccine_rank=0.9394,average_vaccine=126.6721¶
Belgium BE causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.3333,vaccine_rank=0.6667,average_vaccine=60.4173¶
Slovakia SK causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.3030,vaccine_rank=0.2121,average_vaccine=35.4995¶
Sweden SE causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.2727,vaccine_rank=0.9091,average_vaccine=114.4497¶
Hungary HU causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.2424,vaccine_rank=0.3636,average_vaccine=46.8051¶
Montenegro ME causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
Croatia HR causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.1818,vaccine_rank=0.2727,average_vaccine=37.2764¶
Latvia LV causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.1515,vaccine_rank=0.2424,average_vaccine=37.6908¶
Bulgaria BG causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.1212,vaccine_rank=0.1212,average_vaccine=17.6646¶
Lithuania LT causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.0909,vaccine_rank=0.8485,average_vaccine=88.7872¶
Romania RO causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
death_rank=0.0606,vaccine_rank=0.1515,average_vaccine=23.3462¶
Serbia RS causes of death from 2015 - 2023*¶
these are only causes of death where Average of death norms from 2015 - 2019 + 0.25 is less than Average of death norms from 2020 - 2023¶
top = 20
html_table = f"""
<h>top {top} Causes of Death (by appearence)</h>
<table>
<tr>
<th>Item</th>
<th>Count</th>
<th>bar</th>
</tr>
{''.join(f'<tr><td>{i[0]}</td><td>{i[1]}</td><td>{"#" * i[1]}</td></tr>' for i in cod_counter.most_common()[0:top])}
</table>
"""
common_cod = []
for i in range(top):
common_cod.append(cod_counter.most_common()[i][0])
display(HTML(html_table))
| Item | Count | bar |
|---|---|---|
| Ill-defined and unknown causes of mortality | 22 | ###################### |
| Chronic liver disease (excluding alcoholic and toxic liver disease) | 18 | ################## |
| Drug dependence, toxicomania (F11-F16, F18-F19) | 17 | ################# |
| Other endocrine, nutritional and metabolic diseases (remainder of E00-E90) | 17 | ################# |
| Other diseases of the genitourinary system (remainder of N00-N99) | 15 | ############### |
| Other mental and behavioural disorders (remainder of F00-F99) | 15 | ############### |
| Dementia | 13 | ############# |
| Event of undetermined intent | 13 | ############# |
| Diabetes mellitus | 12 | ############ |
| Other external causes of morbidity and mortality (remainder of V01-Y89) | 12 | ############ |
| Falls | 11 | ########### |
| Other infectious and parasitic diseases (remainder of A00-B99) | 9 | ######### |
| Other symptoms, signs and abnormal clinical and laboratory findings (remainder of R00-R99) | 8 | ######## |
| Accidental poisoning by and exposure to noxious substances | 7 | ####### |
| Chronic viral hepatitis B and C | 7 | ####### |
| Certain infectious and parasitic diseases (A00-B99) | 6 | ###### |
| Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism | 6 | ###### |
| Other diseases of the circulatory system (remainder of I00-I99) | 6 | ###### |
| Non-malignant neoplasms (benign and uncertain) | 6 | ###### |
| Other accidents (W20-W64, W75-X39, X50-X59, Y86) | 5 | ##### |
Lets look at these 20 causes of death¶
temp = cod[cod.cod.isin(common_cod)]
temp = temp.fillna(0)
# display(temp.head(5))
temp = pd.pivot_table(
data = temp,
values = 'deaths_norm',
index = ['year','cod'],
# columns=['year'],
aggfunc='mean',
)
# temp = temp.sort_values(by='cod',ascending=True)
temp = temp.reset_index()
temp = temp.sort_values(by='year',ascending=False)
# display(temp)
fig = px.line(
temp,
x= 'year',
y= 'deaths_norm',
color='cod',
hover_data=['year','cod','deaths_norm'],
title=f"most common causes of death 2015-2023*",
height=750
)
fig.update_layout(template="plotly_dark")
fig.show()
lets look at just the ones i think are note-worthy¶
print(*common_cod,sep='\n')
Ill-defined and unknown causes of mortality Chronic liver disease (excluding alcoholic and toxic liver disease) Drug dependence, toxicomania (F11-F16, F18-F19) Other endocrine, nutritional and metabolic diseases (remainder of E00-E90) Other diseases of the genitourinary system (remainder of N00-N99) Other mental and behavioural disorders (remainder of F00-F99) Dementia Event of undetermined intent Diabetes mellitus Other external causes of morbidity and mortality (remainder of V01-Y89) Falls Other infectious and parasitic diseases (remainder of A00-B99) Other symptoms, signs and abnormal clinical and laboratory findings (remainder of R00-R99) Accidental poisoning by and exposure to noxious substances Chronic viral hepatitis B and C Certain infectious and parasitic diseases (A00-B99) Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism Other diseases of the circulatory system (remainder of I00-I99) Non-malignant neoplasms (benign and uncertain) Other accidents (W20-W64, W75-X39, X50-X59, Y86)
nw_cods = [
# if you inject something into the blood, the blood and blood-forming organs could be effected
'Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism',
# the mRNA vaccine could effect DNA cand cuse this issue [wiki Turbo Cancer](https://en.wikipedia.org/wiki/Turbo_cancer)
'Non-malignant neoplasms (benign and uncertain)',
# blood is part of the circulatory system, so it makes sense that it could be effected
'Other diseases of the circulatory system (remainder of I00-I99)',
# the mRNA vaccine was still experimental, so new findings are expected
'Other symptoms, signs and abnormal clinical and laboratory findings (remainder of R00-R99)',
# if you weaken the immune system, it makes sense we would see an increase in inffections and parasites
'Certain infectious and parasitic diseases (A00-B99)',
]
temp = cod[cod.cod.isin(nw_cods)]
temp = temp.fillna(0)
# display(temp.head(5))
temp = pd.pivot_table(
data = temp,
values = 'deaths_norm',
index = ['year','cod'],
# columns=['year'],
aggfunc='mean',
)
# temp = temp.sort_values(by='cod',ascending=True)
temp = temp.reset_index()
temp = temp.sort_values(by='year',ascending=False)
# display(temp)
fig = px.line(
temp,
x= 'year',
y= 'deaths_norm',
color='cod',
hover_data=['year','cod','deaths_norm'],
title=f"note worthy causes of death 2015-2023*",
height=750
)
fig.update_layout(template="plotly_dark")
fig.show()